def fun1(class_name, class_parents, attrs):
    newattr = {}
    for name, value in attrs.items():
        if not name.startswith('__'):
            newattr[name.upper()] = value
    return type(class_name, class_parents, newattr)
    # return type(class_name, class_parents, attrs)


class A(metaclass=fun1):
    name = 'hah'


a = A()

print(A.name)
# print(A.NAME)
